<template>
  <div class="menu-container">
    <van-nav-bar
      class="bgcolor"
      title="食谱"
      safe-area-inset-top
      @click-left="back"
    >
      <template #left>
        <van-icon class="leftIcon" name="arrow-left" size="18" />
      </template>
    </van-nav-bar>

    <van-tabs color="#ff8700" title-active-color="#ff8700" sticky>
      <van-tab
        v-for="localCate in localCateList"
        :title="localCate.name"
        :key="localCate.id"
      >
        <food-cate :localCate="localCate.id" />
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import FoodCate from "../menuMoudle/foodCate/index.vue";
export default {
  name: "MenuMoudle",
  components: { FoodCate },
  data() {
    return {
      localCateList: [
        {
          id: 1,
          name: "南方食谱",
        },
        {
          id: 2,
          name: "北方食谱",
        },
      ],

      foodCateList: [],
    };
  },

  mounted() {},

  methods: {
    back() {
      this.$router.go(-1);
    },
  },
};
</script>

<style lang="less" scoped>
.menu-container {
  .bgcolor {
    background-color: #99d99d;
    color: #000;
    .leftIcon {
      color: #000;
    }
  }

  .title-name {
    padding: 0 10px;
    font-size: 15px;
    width: 100%;
    text-align: center;
  }
}
</style>